/* TextBox */

.textbox {
  border-radius: var(--box-border-radius);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  overflow: hidden;
  background: var(--theme-background-primary);
  height: 32px;
}

.textbox-input {
  border: 0;
  outline: 0;
  background: none;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  color: var(--primary-text-color);
  font: inherit;
}

.textbox-input::placeholder {
  font: inherit;
  color: var(--label-color);
}

.textbox svg {
  width: 12px;
  height: 12px;
}


/* SearchBox */

.search-box-icon {
  margin-right: 10px;
}

/* Toggle */
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 25px;
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  overflow: hidden;
  background: var(--window-background);
  cursor: pointer;
  transition: background-color .1s ease;
}
.toggle.checked {
  border-color: var(--accent-color);
  background-color: var(--accent-color);
}

.toggle-button {
  width: 100%;
  height: 100%;
  padding: 5px 10px;
  color: var(--primary-text-color);
  font-size: inherit;
  letter-spacing: inherit;
}

.toggle-indicator {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 100%;
  background-color: var(--gray-color-1);
  transition: transform .3s var(--animation-timing-function), background-color .1s ease;
}

.toggle.checked .toggle-indicator {
  /* background-color: var(--accent-color); */
  background-color: #fff;
  transform: translateX(100%);
}

/* Select */
.select {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 32px;
  background-color: var(--window-background);
  color: var(--primary-text-color);
  font-size: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--box-border-radius);
}

.select.no-background {
  background-color: transparent;
}

.select-placeholder {
  height: 100%;
  padding-left: 10px;
  min-width: 120px;
}

.select-placeholder-icon {
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-placeholder-icon svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0;
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: overlay;
  background-color: var(--window-background);
  background-clip: padding-box;
  /* border: 1px solid var(--border-color); */
  border-radius: var(--box-border-radius);
  user-select: none;
  opacity: 0;
  transition: opacity .2s ease;
}

html.glass .select-options {
  backdrop-filter: blur(var(--box-blur));
}

.select-options.show {
  height: auto;
  box-shadow: var(--box-drop-shadow);
  opacity: 1;
}

.select-option {
  position: relative;
  padding: 10px;
  transition: background-color .2s ease-in-out;
}

.select-option-decorator {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  height: 60%;
  margin: auto;
  contain: layout;
  pointer-events: none;
  border-radius: var(--box-border-radius);
}

.select-option:hover {
  background-color: var(--hover-bg-color);
}

.select-option.selected .select-option-decorator {
  background-color: var(--accent-color);
}
